<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>filter筛选数组</title>
</head>
<body>
    <script>
        var arr = [22,34,55,77,23];
        var newArr = arr.filter(function (value) {
            return value % 2 === 0;
        })
        console.log(newArr);
    </script>
</body>
</html>